/*-*-C-*-
 * class - ResEd Shell class-related data structures
 */

#ifndef __defined_class_h
#define __defined_class_h


/*
 * Each CSE is represented by one of these structures, held in a malloced list.
 */

typedef struct _cserec
{
    int taskid;                               /* it's task ID or 0 for not running */
    char pathname[FILENAMELEN];               /* what to execute */
    struct _cserec *next;
} CSERec, *CSEPtr;


/*
 * Each class that we know about is represented by one of these.  They are
 * stored in a list because the number of classes is expected to be small.
 */

typedef struct _classrec
{
    ObjectClass class;                        /* Class number */
    char classname[CLASSNAMELEN];             /* String name for class */
    char spritename[SPRITENAMELEN];           /* Sprite to use for its icon */
    CSEPtr cse;                               /* Ptr to the CSE for this class */
    struct _classrec *next;
} ClassRec, *ClassPtr;


extern error * class_initialise (void);
extern ClassPtr class_lookup (ObjectClass class);
extern error * class_prime_palette (void);
extern CSEPtr class_lookup_cse (int taskid);
extern error * class_launch_cse (ClassPtr class);


#endif
